home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / virus / tbav706.zip / INSTALL.BAT < prev    next >
DOS Batch File  |  1996-10-23  |  11KB  |  357 lines

  1. @echo off
  2. echo off
  3. echo        --- Thunderbyte Anti-Virus installation batch program ---
  4. echo.
  5.  
  6. rem     * Make sure that we can find the utilities in the current directory
  7. if not exist TBSCAN.EXE goto error1
  8.  
  9. rem     * Find out if we are upgrading a previous version in the current dir
  10. if exist TBSTART.BAT goto pathexists
  11.  
  12. rem     * Make sure that the user specified a destination path
  13. if %1X==X goto error2
  14.  
  15. rem     * Make sure the target path exists or can be created
  16. if exist %1\nul goto pathexists
  17. md %1
  18. if not exist %1\nul goto error3
  19. :pathexists
  20.  
  21. rem     * Make sure user did not type something like 'C:' :-)
  22. if exist %1\CONFIG.SYS goto error5
  23.  
  24. echo Please read the License.Doc file. By using the TBAV package you
  25. echo agree with our license agreement. You can print the License.Doc
  26. echo file by typing the following command on the DOS command line:
  27. echo    Copy License.Doc Lpt1
  28. echo Press Ctrl-C to abort this installation batch file, or
  29. pause
  30.  
  31. echo.
  32. echo This installation batch file of the shareware version of TBAV
  33. echo is not the same as the full featured installation program of the
  34. echo commercial version of TBAV. (The main reason for the omission of
  35. echo the installation program is to save disk space and to minimize
  36. echo download time). Therefore the installation procedure might
  37. echo differ from the procedure described in the manual.
  38. echo.
  39.  
  40. rem     * If TbScanX is active, de-activate it.
  41. if not exist SCANX goto notres
  42. if exist %1\tbscanx.exe %1\tbscanx /off
  43.  
  44. :notres
  45. rem     * Copy the TBAV utilities if necessary
  46. if exist dummy.tst del dummy.tst >nul
  47. if exist %1\dummy.tst del %1\dummy.tst >nul
  48. echo TEST >%1\dummy.tst
  49. if exist dummy.tst goto filesexists
  50. if not exist %1\dummy.tst goto error4
  51. echo TbSetup will now delete the Anti-Vir.Dat file of a previous
  52. echo TBAV version if it exists in directory %1
  53. pause
  54. rem     * If Anti-Vir.Dat already exists and is hidden, delete it...
  55. tbsetup %1 remove
  56. cls
  57. echo Copying files. Please wait...
  58. copy addendum.doc %1 >nul
  59. copy agents.doc %1 >nul
  60. copy anti-vir.dat %1 >nul
  61. copy appnotes.doc %1 >nul
  62. copy esass.pgp %1 >nul
  63. copy file_id.diz %1 >nul
  64. copy install.bat %1 >nul
  65. copy license.doc %1 >nul
  66. copy makeresc.bat %1 >nul
  67. copy no_vsum.doc %1 >nul
  68. copy register.exe %1 >nul
  69. copy report.doc %1 >nul
  70. copy security.doc %1 >nul
  71. copy tbav.doc %1 >nul
  72. copy tbav.exe %1 >nul
  73. copy tbav.lng %1 >nul
  74. copy tbav.msg %1 >nul
  75. copy tbcheck.exe %1 >nul
  76. copy tbclean.exe %1 >nul
  77. copy tbdel.com %1 >nul
  78. copy tbdisk.exe %1 >nul
  79. copy tbdriver.exe %1 >nul
  80. copy tbdriver.lng %1 >nul
  81. copy tbfile.exe %1 >nul
  82. copy tbgensig.exe %1 >nul
  83. copy tbkey.exe %1 >nul
  84. copy tblog.exe %1 >nul
  85. copy tbmem.exe %1 >nul
  86. copy tbscan.eci %1 >nul
  87. copy tbscan.exe %1 >nul
  88. copy tbscan.lng %1 >nul
  89. copy tbscan.sig %1 >nul
  90. copy tbscanx.exe %1 >nul
  91. copy tbsetup.dat %1 >nul
  92. copy tbsetup.exe %1 >nul
  93. copy tbutil.exe %1 >nul
  94. copy tbutil.lng %1 >nul
  95. copy veldman.pgp %1 >nul
  96. copy tbav.faq %1 >nul
  97. copy tbmon.com %1 >nul
  98. copy whatsnew.* %1 >nul
  99. if %_4ver%x==x copy descript.ion %1 >nul
  100.  
  101. :filesexists
  102. del %1\dummy.tst >nul
  103. if not exist %1\docs.exe goto nopack
  104. %1\docs -o %1
  105. del %1\docs.exe >nul
  106. :nopack
  107.  
  108. rem     * DOS has no interactive batch file commands,
  109. rem     * so we create a special program to solve that!
  110. rem     * the 'garbage' in the echo command is program code
  111. rem     * to read a key into an errorlevel, the program code
  112. rem     * will be copied into an executable file.
  113. echo ═êα╧┤L═! >%1\ask.com
  114.  
  115. echo.
  116. echo TbSetup will now generate or update the Anti-Vir.Dat file
  117. echo of the directory %1
  118. pause
  119. rem     * create or update the Anti-Vir.Dat records of the TBAV utilities
  120. %1\TBSETUP %1
  121.  
  122. cls
  123. rem     * do not overwrite an existing TBAV setup.
  124. if exist %1\TBSTART.BAT goto upgrade
  125.  
  126. echo.
  127. echo The Thunderbyte Anti-Virus utilities have been copied to the destination
  128. echo directory. It is recommended to read the documentation of TBAV thoroughly
  129. echo and to make a customized setup. One of the advantages of the Thunderbyte
  130. echo Anti-Virus utilities is flexibility and the possibility to configure
  131. echo them to suit your needs in an optimal way.
  132. echo.
  133. echo This installation batch file helps you to setup the utilities in their
  134. echo most standard and non-customized way.
  135. echo Do you want to continue? (Y/n)
  136. %1\ask
  137. if not errorlevel 1 goto nosetup
  138.  
  139. rem     * make a backup of the AUTOEXEC.BAT file!
  140. echo.
  141. echo Backing up C:\AUTOEXEC.BAT to C:\AUTOEXEC.ORG...
  142. copy c:\autoexec.bat c:\autoexec.org >nul
  143.  
  144. rem     * create a TBSTART.BAT file in the TBAV directory.
  145. echo @echo off >%1\TBSTART.BAT
  146. echo echo off >>%1\TBSTART.BAT
  147.  
  148. echo.
  149. echo For easy access of the TBAV utilities it is recommended to put them
  150. echo into your PATH environment variable.
  151. echo Do you want to add %1 to your PATH statement? (Y/n)
  152. %1\ask
  153. if not errorlevel 1 goto dosetup
  154. rem     * add the PATH statement to the end of the AUTOEXEC.BAT file.
  155. echo PATH=%%PATH%%;%1 >>C:\AUTOEXEC.BAT
  156.  
  157. :dosetup
  158. echo.
  159. echo TbSetup will now process your drives to generate the Anti-Vir.Dat files.
  160. pause
  161. rem     * process the rest of the machine, but do not touch existing information!
  162. %1\TbSetup NewOnly AllDrives
  163.  
  164. :tbdriver
  165. cls
  166. echo.
  167. echo The TBAV package contains some utilities that can be installed in the memory
  168. echo of your PC. Do you want to add them to your AUTOEXEC.BAT file? (Y/n)
  169. %1\ask
  170. if not errorlevel 1 goto autoscan
  171. rem     * create a TBSTART.BAT file in the TBAV directory.
  172. echo %1\TbDriver >>%1\TBSTART.BAT
  173.  
  174. echo.
  175. echo TBSCANX is a memory resident virus scanner.
  176. echo Do you want to install it? (Y/n)
  177. %1\ask
  178. if not errorlevel 1 goto tbcheck
  179. rem     * add the TbScanX statement to the TBSTART.BAT file.
  180. echo %1\TbScanX EMS XMS >>%1\TBSTART.BAT
  181.  
  182. :tbcheck
  183. echo.
  184. echo TBCHECK is a memory resident integrity checker.
  185. echo Do you want to install it? (Y/n)
  186. %1\ask
  187. if not errorlevel 1 goto tbmem
  188. rem     * add the TbCheck statement to the TBSTART.BAT file.
  189. echo %1\TbCheck noavok=ab >>%1\TBSTART.BAT
  190.  
  191. :tbmem
  192. echo.
  193. echo TBMEM is a resident memory guard.
  194. echo Do you want to install it? (Y/n)
  195. %1\ask
  196. if not errorlevel 1 goto tbfile
  197. rem     * add the TbMem statement to the TBSTART.BAT file.
  198. echo %1\TbMem >>%1\TBSTART.BAT
  199.  
  200. :tbfile
  201. echo.
  202. echo TBFILE is a resident file guard.
  203. echo Do you want to install it? (Y/n)
  204. %1\ask
  205. if not errorlevel 1 goto autoscan
  206. rem     * add the TbFile statement to the TBSTART.BAT file.
  207. echo %1\TbFile >>%1\TBSTART.BAT
  208.  
  209. :autoscan
  210. echo.
  211. echo Do you want the system to be scanned automatically for viruses every day? (Y/n)
  212. %1\ask
  213. if not errorlevel 1 goto addcall
  214. rem     * add the TbScan statement to the TBSTART.BAT file.
  215. echo %1\TbScan Once AllDrives >>%1\TBSTART.BAT
  216.  
  217. :addcall
  218. if exist C:\TEMP.BAT del C:\TEMP.BAT >nul
  219. echo call %1\TBSTART.BAT >C:\TEMP.BAT
  220. copy /a C:\TEMP.BAT + C:\AUTOEXEC.BAT C:\TEMP2.BAT >nul
  221. copy C:\TEMP2.BAT C:\AUTOEXEC.BAT >nul
  222. del C:\TEMP.BAT >nul
  223. del C:\TEMP2.BAT >nul
  224.  
  225. :ready
  226. echo.
  227. echo Do you want to scan your drives now? (Y/n)
  228. %1\ask
  229. if not errorlevel 1 goto starttbav
  230. %1\TbScan AllDrives
  231.  
  232. :starttbav
  233. cls
  234. :nosetup
  235. echo.
  236. echo It is highly recommended to print the TBAV user manual.
  237. echo You can do this with the following DOS command:
  238. echo    Copy TBAV.DOC Lpt1
  239. echo.
  240. echo If you are upgrading from previous TBAV versions, it is recommended
  241. echo to print the WHATSNEW files and the Addendum.Doc.
  242. echo You can do this with the following DOS command:
  243. echo    Copy WHATSNEW.* Lpt1
  244. echo    Copy ADDENDUM.DOC Lpt1
  245. echo.
  246. echo The menu program TBAV.EXE can be used to read the documentation files.
  247. echo Do you want to start TBAV now? (Y/n)
  248. %1\ask
  249. if not errorlevel 1 goto flush
  250. %1\TBAV
  251. goto end
  252.  
  253. :upgrade
  254. echo.
  255. if exist %1\UserSig.Dat %1\TbGenSig
  256. rem     * Delete all stuff we don't support anymore
  257. echo Install.Bat will delete some obsolete files from previous TBAV
  258. echo versions which are not supported anymore.
  259. echo.
  260. if exist %1\TbScan.Com del %1\TbScan.Com >nul
  261. if exist %1\TbScan.Msg del %1\TbScan.Msg >nul
  262. if exist %1\VirScan.Dat del %1\VirScan.Dat >nul
  263. if exist %1\AddnSigs.Dat del %1\AddnSigs.Dat >nul
  264. if exist %1\ComprSca.* del %1\ComprSca.* >nul
  265. if exist %1\*.AVR del %1\*.AVR >nul
  266. if exist %1\MTE.Doc del %1\MTE.Doc >nul
  267. if exist %1\Washburn.Doc del %1\Washburn.Doc >nul
  268. if exist %1\TbScanX.Com del %1\TbScanX.Com >nul
  269. if exist %1\TbRescue.* del %1\TbRescue.* >nul
  270. if exist %1\TBAV.CFG del %1\TBAV.CFG >nul
  271. if exist %1\TbShell.* del %1\TbShell.* >nul
  272. if exist %1\register.exe ren %1\register.exe reg.exe >nul
  273. if exist %1\register.txt ren %1\register.txt reg.txt >nul
  274. if exist %1\register.* del %1\register.* >nul
  275. if exist %1\reg.exe ren %1\reg.exe register.exe >nul
  276. if exist %1\reg.txt ren %1\reg.txt register.txt >nul
  277. if exist %1\TbGarble.* del %1\TbGarble.* >nul
  278. if exist %1\GetBoot.* del %1\GetBoot.* >nul
  279. if exist %1\Intro.Doc del %1\Intro.Doc >nul
  280. if exist %1\TbSetup.Doc del %1\TbSetup.Doc >nul
  281. if exist %1\TbUtil.Doc del %1\TbUtil.Doc >nul
  282. if exist %1\TbScan.Doc del %1\TbScan.Doc >nul
  283. if exist %1\TbClean.Doc del %1\TbClean.Doc >nul
  284. if exist %1\StackMan.Doc del %1\StackMan.Doc >nul
  285. if exist %1\TbGensig.Doc del %1\TbGensig.Doc >nul
  286. if exist %1\TbDriver.Doc del %1\TbDriver.Doc >nul
  287. if exist %1\TbScanX.Doc del %1\TbScanX.Doc >nul
  288. if exist %1\TbCheck.Doc del %1\TbCheck.Doc >nul
  289. if exist %1\TbMem.Doc del %1\TbMem.Doc >nul
  290. if exist %1\TbFile.Doc del %1\TbFile.Doc >nul
  291. if exist %1\TbDisk.Doc del %1\TbDisk.Doc >nul
  292. if exist %1\TbDel.Doc del %1\TbDel.Doc >nul
  293. if exist %1\Upgrade.Bat del %1\Upgrade.Bat >nul
  294. if exist %1\TBAV.ICO del %1\TBAV.ICO >nul
  295. if exist %1\TBAV.PIF del %1\TBAV.PIF >nul
  296. echo All obsolete TBAV files have been removed.
  297. echo.
  298. if not exist %1\StackMan.Exe goto ready
  299. echo Note: StackMan.Exe is not necessary anymore to solve TBAV problems.
  300. echo StackMan is therefor no longer supplied with the shareware TBAV package.
  301. echo If you do not use StackMan, you can delete it from the TBAV directory.
  302. goto ready
  303.  
  304. :error1
  305. echo Error: Invalid program invocation!
  306. echo.
  307. echo Make sure that you invoke INSTALL.BAT in the directory where the
  308. echo TBAV utilities can be found!
  309. echo.
  310. echo Example: if the TBAV utilities can be found on drive A:, you should type:
  311. echo A: [enter]
  312. echo INSTALL [path] [enter]
  313. goto end
  314.  
  315. :error2
  316. echo Error: No destination path specified!
  317. echo.
  318. echo You have to specify the destination path for the TBAV utilities!
  319. echo Even if the utilities are already in the destination path.
  320. echo.
  321. echo Example:
  322. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  323. echo INSTALL C:\TBAV
  324. goto end
  325.  
  326. :error3
  327. echo Error: Unable to creat destination directory %1
  328. echo.
  329. echo Make sure you enter an existing destination path or a path that can be created!
  330. goto end
  331.  
  332. :error4
  333. echo Error: Unable to copy files in directory %1
  334. echo.
  335. echo Disk full? Access denied?
  336. goto end
  337.  
  338. :error5
  339. echo Error: No target directory specified!
  340. echo.
  341. echo Make sure you enter a full destination path!
  342. echo %1 is not sufficient!
  343. echo.
  344. echo Example:
  345. echo If the TBAV utilities are or should be copied to C:\TBAV, please type:
  346. echo INSTALL C:\TBAV
  347. goto end
  348.  
  349. :flush
  350. echo.
  351. echo If you have a disk cache installed, wait a few seconds to allow the
  352. echo cache to flush the buffers, and reboot...
  353.  
  354. :end
  355. if exist %1\ask.com del %1\ask.com >nul
  356.  
  357.